package com.example.web_flux.controller;

import com.example.web_flux.vo.DateVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Collections;
import java.util.Date;
import java.util.Map;

/**
 * @author luo
 * @description
 * @since 2022/8/15 09:23
 */
@RestController
public class DateController {

    @GetMapping("/now")
    public Map<String,Date> now(){

        return Collections.singletonMap("now",new Date());
    }

    @GetMapping("/nowDateVo")
    public DateVo nowDateVo(){

        return new DateVo(new Date());
    }

}
